<#include "/common/common.ftl" encoding="UTF-8">
	<link href="${staticUrl}/css/form.css" type="text/css" rel="stylesheet" />
	<link href="${staticUrl}/js/validate/jquery.validate.css" type="text/css" rel="stylesheet" />
	<script src="${staticUrl}/js/validate/jquery.validate.js" type="text/javascript"></script>
	<script src="${staticUrl}/js/validate/messages_cn.js" type="text/javascript"></script>
	<script src="${staticUrl}/common/fckeditor/editor/js/fckeditorcode_ie.js" type="text/javascript"></script>
	<script src="${staticUrl}/common/fckeditor/fckconfig.js" type="text/javascript"></script>
	<script src="${staticUrl}/common/fckeditor/editor/dialog/common/fck_dialog_common.js" type="text/javascript"></script>
	<script src="${staticUrl}/common/fckeditor/cj.js" type="text/javascript"></script>
	<#assign action="template">
	<script>
		var treeUrl = "${request.contextPath}/security/dept!deptTree.action?id=1&exceptionId=${id?if_exists}";
		$(document).ready(function(){
			//为inputForm注册validate函数
			$("#inputForm").validate();
		});
	</script>
</head>
<body>
<#include "/common/tree_div.ftl" encoding="UTF-8">
<div class="title"><#if id?exists>修改<#else>创建</#if>模板</div>
<div id="inputContent" class="content">
<form id="inputForm" action="${action}!save.action" method="post">
<input type="hidden" name="id" value="${(id)?if_exists}" />
<table class="content">
	<tr>
		<@ftlMacro.inputText name="code" descript="模板代码" textShow="${code?if_exists}" cssStyle="required"/>
	</tr>
	<tr>
		<@ftlMacro.inputText name="name" descript="模板名称" textShow="${name?if_exists}" cssStyle="required"/>
	</tr>
	<tr>
		<td class="textLabel">模版路径<a href="#" onClick="BrowseServer('path')">>></a>:</td>
		<td>
			<input type="text" class="divshow" name="path" id="path" size="40" value="${(path)?if_exists}" />		
		</td>
	</tr>
	<tr>
		<td class="textLabel">类型:</td>
		<td>
		<@ftlMacro.radio name="type" textValues=templateTypeMap  checkedValue=type?if_exists />
		</td>
	</tr>
	<tr>
        <td class="textLabel"><div class='descript' >描述：</div>
        </td>
        <td class="textShow">
           <textarea name="description" class="textareaShow">${(description)?if_exists}</textarea>
        </td>
	</tr>
	<#if createTime?exists>
	<tr>
		<@ftlMacro.detailText descript="创建时间" textShow="${createTime?if_exists}"/>
	</tr>
	</#if>
	<tr class="button">
		<td colspan="2">
			<input type="submit" value="提交" />&nbsp; 
			<input type="button" value="取消" onclick="history.back()"/>
		</td>
	</tr>
	<tr>
		<td colspan="2">
		</td>
	</tr>
</table>
</form>
</div>
</body>
</html>